home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / shells / rc-1.000 / rc-1 / rc-1.5-linux / Makefile < prev    next >
Encoding:
Makefile  |  1994-07-28  |  1.7 KB  |  63 lines

  1. # Makefile for rc.
  2.  
  3. # Please check the configuration parameters in config.h (and if you want
  4. # to make sure, the definitions in proto.h) to make sure they are correct
  5. # for your system.
  6.  
  7. SHELL=/bin/sh
  8.  
  9. # Uncomment this line if you have defined the NOEXECVE macro in config.h
  10. #EXECVE=execve.o
  11.  
  12. # Define this macro if you wish to extend rc via locally-defined builtins.
  13. # An interface is provided in addon.h. Note that the author does not
  14. # endorse any such extensions, rather hopes that this way rc will become
  15. # useful to more people.  All files of the form b_*.c will be compiled as
  16. # builtins.
  17. ADDON=$(subst .c,.o, $(wildcard b_*.c))  # GNU make SPECIFIC !!!
  18.  
  19. # Use an ANSI compiler (or at least one that groks prototypes and void *):
  20. CC=gcc
  21. CFLAGS=-O2 -fomit-frame-pointer -funroll-loops -DSYSVR4 -DADDON
  22. LDFLAGS=-s #-static -lreadline -ltermcap  # uncomment if compiling in readline
  23.  
  24. # You may substitute "bison -y" for yacc. (You want to choose the one that
  25. # makes a smaller y.tab.c. Also see the README about Sun's yacc.)
  26. YACC=yacc
  27.  
  28. OBJS=$(ADDON) builtins.o except.o exec.o $(EXECVE) fn.o footobar.o getopt.o \
  29.     glob.o glom.o hash.o heredoc.o input.o lex.o list.o main.o match.o \
  30.     nalloc.o open.o print.o redir.o sigmsgs.o signal.o status.o tree.o \
  31.     utils.o var.o version.o wait.o walk.o which.o y.tab.o
  32.  
  33. rc: $(OBJS)
  34.     $(CC) -o $@ $(OBJS) $(LDFLAGS)
  35.  
  36. sigmsgs.c: mksignal
  37.     sh mksignal /usr/include/sys/signal.h
  38.  
  39. y.tab.c: parse.y
  40.     $(YACC) -d parse.y
  41.  
  42. config.h: config.h-dist
  43.     cp config.h-dist config.h
  44.  
  45. trip: rc
  46.     ./rc -p < trip.rc
  47.  
  48. clean: force
  49.     rm -f *.o *.tab.*
  50.  
  51. history: force
  52.     cd history; make CC="$(CC)" $(HISTORYMAKEFLAGS)
  53.  
  54. force:
  55.  
  56. # dependencies:
  57.  
  58. $(OBJS): config.h
  59. sigmsgs.h: sigmsgs.c
  60. lex.o y.tab.o: y.tab.c
  61. builtins.c fn.c status.c hash.c: sigmsgs.h
  62. builtins.o: addon.h
  63.